home *** CD-ROM | disk | FTP | other *** search
/ Family Forum 262 / SOMC Family Forum 262.iso / somc.dir / 00001_Start Movie.ls next >
Encoding:
Text File  |  1999-03-23  |  2.7 KB  |  109 lines

  1. on startMovie
  2.   global WHICHSNEAK, P1SETUP, P2SETUP, P3SETUP, P4SETUP, M1SETUP, M2SETUP, M3SETUP, M4SETUP, mFINGER, mFINGERMASK
  3.   set STARTM to new(xtra("fileio"))
  4.   createFile(STARTM, "c:\STARTM.SMC")
  5.   set the exitLock to 1
  6.   set WHICHSNEAK to "GAME"
  7.   set P1SETUP to "@\ibmins\launcher.exe"
  8.   set P2SETUP to "@\setupQ.exe"
  9.   set P3SETUP to "@\dmnsion\setup.exe"
  10.   set P4SETUP to EMPTY
  11.   set M1SETUP to "help text"
  12.   set M2SETUP to "help text"
  13.   set M3SETUP to EMPTY
  14.   set M4SETUP to "help text"
  15.   set mFINGER to the number of member "Finger1"
  16.   set mFINGERMASK to the number of member "Finger2"
  17.   glowClear()
  18. end
  19.  
  20. on glow WHICHSPRITE, TRUEORFALSE
  21.   set the visible of sprite WHICHSPRITE to TRUEORFALSE
  22. end
  23.  
  24. on glowClear
  25.   repeat with i = 20 to 39
  26.     glow(i)
  27.   end repeat
  28. end
  29.  
  30. on textglow WHICHMEMBER, COLORNUMBER
  31.   set the foreColor of member WHICHMEMBER to COLORNUMBER
  32. end
  33.  
  34. on openMIAW MYWINDOW
  35.   set myRect to the rect of window MYWINDOW
  36.   set myStage to the rect of the stage
  37.   set myWidth to getAt(myRect, 3) - getAt(myRect, 1)
  38.   set myHeight to getAt(myRect, 4) - getAt(myRect, 2)
  39.   set myLocH to ((getAt(myStage, 3) + getAt(myStage, 1)) / 2) - (myWidth / 2)
  40.   set myLocV to ((getAt(myStage, 2) + getAt(myStage, 4)) / 2) - (myHeight / 2)
  41.   set myNewRect to rect(myLocH, myLocV, myLocH + myWidth, myLocV + myHeight)
  42.   set the rect of window MYWINDOW to myNewRect
  43.   set the windowType of window MYWINDOW to 2
  44.   open(window MYWINDOW)
  45. end
  46.  
  47. on doRollout numsprite
  48.   glow(numsprite, 0)
  49.   cursor(0)
  50. end
  51.  
  52. on doClick
  53.   puppetSound(1, "clicksound")
  54.   updateStage()
  55. end
  56.  
  57. on checkAnswer
  58.   global correct, ncount, ANSWER, TRIES, right
  59.   put line ncount of the text of member "ww3" into field "definition"
  60.   set the textSize of member "definition" to 18
  61.   set the textStyle of member "definition" to "bold"
  62.   glow(20, 1)
  63.   set TRIES to TRIES + 1
  64.   if ANSWER = correct then
  65.     glow(52, 1)
  66.     puppetSound(1, "Woww1")
  67.     updateStage()
  68.     set right to right + 1
  69.   else
  70.     glow(53, 1)
  71.     puppetSound(1, "Buzzer2")
  72.     updateStage()
  73.   end if
  74. end
  75.  
  76. on finish
  77.   global TRIES, right, scoreSTR
  78.   go("FIN")
  79.   if TRIES then
  80.     if (float(right) / float(TRIES)) > 0.49000000000000005 then
  81.       puppetSound(1, "Glfclap1")
  82.       updateStage()
  83.     end if
  84.   end if
  85.   set scoreSTR2 to "YOU GOT" && string(right) && "OUT OF" && string(TRIES) && "RIGHT"
  86.   set the text of member "scoreSTR" to scoreSTR2
  87.   updateStage()
  88. end
  89.  
  90. on timedelay SECONDS
  91.   startTimer()
  92.   repeat while the timer < (SECONDS * 60)
  93.     nothing()
  94.   end repeat
  95. end
  96.  
  97. on doRollover numsprite, SOUNDNUM
  98.   global mFINGER, mFINGERMASK
  99.   cursor([mFINGER, mFINGERMASK])
  100.   glow(numsprite, 1)
  101.   updateStage()
  102.   case SOUNDNUM of
  103.     1:
  104.       puppetSound(1, "rollsound")
  105.     2:
  106.       puppetSound(1, "rollsound2")
  107.   end case
  108. end
  109.